// 定义断点变量
@mobile-width: 768px;
@tablet-width: 1024px;
@desktop-width: 1440px;

// 混合器
.flex-center() {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-column() {
  display: flex;
  flex-direction: column;
}

.person-info {
  background: #f5f5f5;
  min-height: 100vh;

  @media print {
    background: #fff;
    min-height: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;

    .resume-container {
      max-width: 100%;
      margin: 0;
      padding: 20px;
      box-shadow: none;
      border-radius: 0;
      background: #fff;
      height: auto;
      overflow: visible;
      page-break-after: always;
    }

    .basic-info {
      page-break-after: auto;
      margin-bottom: 20px;
      padding-bottom: 15px;
    }

    .section {
      page-break-before: auto;
      page-break-after: auto;
      margin-bottom: 20px;

      h3 {
        border-bottom: 1px solid #ddd;
      }
    }

    .work-item, .education-item, .project-item {
      page-break-inside: avoid;
      page-break-after: auto;
    }

    .skill-tags, .tech-tags {
      .skill-tag, .tech-tag {
        border: 1px solid #ddd;
        background: none;
        color: #333;
        box-shadow: none;
      }
    }
  }

  .resume-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 30px;

    @media screen and (max-width: @mobile-width) {
      padding: 15px;
      border-radius: 0;
      box-shadow: none;
    }
  }

  .basic-info {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;

    .avatar {
      width: 80px;
      height: 80px;
      margin-right: 20px;
      flex-shrink: 0;

      img {
        width: 100%;
        height: 100%;
        border-radius: 4px;
        object-fit: cover;
        border: 1px solid #eee;
      }
    }

    .info {
      flex: 1;

      h1 {
        font-size: 20px;
        color: #333;
        margin: 0 0 8px;
        font-weight: 600;
      }

      h2 {
        font-size: 15px;
        color: #666;
        margin: 0 0 12px;
        font-weight: 500;
      }

      .contact-info {
        p {
          margin: 6px 0;
          color: #666;
          font-size: 13px;
          display: flex;
          align-items: center;

          i {
            margin-right: 8px;
            color: #666;
            font-size: 14px;
          }
        }
      }
    }
  }

  .section {
    margin-bottom: 25px;

    h3 {
      font-size: 16px;
      color: #333;
      margin-bottom: 15px;
      padding-bottom: 8px;
      border-bottom: 1px solid #eee;
      position: relative;
      font-weight: 600;
    }
  }

  .education-list, .work-list, .project-list {
    .education-item, .work-item, .project-item {
      margin-bottom: 20px;
      position: relative;

      h4 {
        font-size: 15px;
        color: #333;
        margin: 0 0 4px;
        font-weight: 500;
      }

      p {
        margin: 4px 0;
        color: #666;
        font-size: 13px;
        line-height: 1.6;
      }
    }
  }

  .work-item {
    .work-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 4px;

      @media screen and (max-width: @mobile-width) {
        flex-direction: column;
        align-items: flex-start;
      }

      .period {
        color: #999;
        font-size: 12px;

        @media screen and (max-width: @mobile-width) {
          margin-top: 5px;
        }
      }
    }

    .position {
      color: #666;
      margin-bottom: 8px;
      font-size: 13px;
      font-weight: 500;
    }

    .highlights {
      margin: 0;
      padding-left: 16px;

      li {
        color: #666;
        margin-bottom: 4px;
        font-size: 13px;
        line-height: 1.6;
      }
    }
  }

  .skills-list {
    .skill-group {
      margin-bottom: 20px;

      h4 {
        font-size: 14px;
        color: #333;
        margin-bottom: 8px;
        font-weight: 500;
      }

      .skill-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;

        .skill-tag {
          background: #f0f5ff;
          color: #1890ff;
          padding: 4px 12px;
          border-radius: 6px;
          font-size: 13px;
          transition: all 0.3s ease;
          font-weight: 500;

          &:hover {
            background: #1890ff;
            color: #fff;
            transform: translateY(-1px);
          }
        }
      }
    }
  }

  .project-item {
    .project-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;

      @media screen and (max-width: @mobile-width) {
        flex-direction: column;
        align-items: flex-start;
      }

      .role {
        color: #1890ff;
        font-size: 13px;
        font-weight: 500;

        @media screen and (max-width: @mobile-width) {
          margin-top: 5px;
        }
      }
    }

    .description {
      color: #666;
      margin-bottom: 10px;
      font-size: 13px;
      line-height: 1.6;
    }

    .tech-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;

      .tech-tag {
        background: #f6f6f6;
        color: #666;
        padding: 4px 12px;
        border-radius: 6px;
        font-size: 13px;
        transition: all 0.3s ease;
        font-weight: 500;

        &:hover {
          background: #e6e6e6;
          transform: translateY(-1px);
        }
      }
    }
  }

  .certificate-list {
    .certificate-item {
      margin-bottom: 15px;

      h4 {
        font-size: 14px;
        color: #333;
        margin: 0 0 4px;
        font-weight: 500;
      }

      p {
        color: #666;
        font-size: 13px;
        margin: 0;
        line-height: 1.6;
      }
    }
  }
} 